package cn.tedu.rtc.sdk.api.device;

import cn.tedu.rtc.sdk.mqtt.ChannelName;
import cn.tedu.rtc.sdk.mqtt.events.EventsDataRequest;
import cn.tedu.rtc.sdk.mqtt.events.RemoteDebugProgress;
import cn.tedu.rtc.sdk.mqtt.events.TopicEventsRequest;
import cn.tedu.rtc.sdk.mqtt.events.TopicEventsResponse;
import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHeaders;


public abstract class AbstractDeviceService {

    /**
     * 发送格式：
     * {
     *   "tid":"6a7bfe89-c386-4043-b600-b518e10096cc","bid":"42a19f36-5117-4520-bd13-fd61d818d52e","timestamp": 1598411295123,"needReply": 0,"gateway":"sn","method": "drone_open","data": {"result": 0, "output": {"status": "processing", "percent": 55}}
     * }
     * @param request  data
     * @param headers   The headers for a {@link Message}.
     * @return events_reply
     */
    @ServiceActivator(inputChannel = ChannelName.INBOUND_EVENTS_CONTROL_PROGRESS, outputChannel = ChannelName.OUTBOUND_EVENTS)
    public TopicEventsResponse remoteDebugProgress(TopicEventsRequest<EventsDataRequest<RemoteDebugProgress>> request, MessageHeaders headers) {
        throw new UnsupportedOperationException("remoteDebugProgress not implemented");
    }

}
